
package testSudoku;

import static org.junit.Assert.*;

import org.junit.Test;
import sudoku.hard_qustion;
public class testHard_question {

	// Test case 1: test class "Hard_qustion":  test question1
	@Test
	public void testquestion1() 
	{
		hard_qustion question =new hard_qustion();	
		char[][][] quest = question.get_questn();
		char [][]result = new char[][] {
				{' ',' ',' ','2','9','1',' ',' ',' '},
				{'4',' ',' ','5',' ','3',' ',' ','7'},
				{' ',' ','3',' ',' ',' ','8',' ',' '},
				{'7',' ','4',' ','2',' ','1',' ','9'},
				{' ','8',' ',' ',' ',' ',' ','5',' '},
				{'2',' ','1',' ','4',' ','6',' ','3'},
				{' ',' ','2',' ',' ',' ','3',' ',' '},
				{'3',' ',' ','9',' ','2',' ',' ','6'},
				{' ',' ',' ','4','3','6',' ',' ',' '}
		};
		
	
		assertArrayEquals(result, quest[0]);
	}
	
	
	// Test case 2: test class "Hard_qustion":  test question2
	@Test
	public void testquestion2() 
	{
		hard_qustion question =new hard_qustion();	
		char[][][] quest = question.get_questn();
		char [][]result = new char[][] {
				{' ','5',' ',' ','7',' ',' ','1',' '},
				{'7',' ',' ','2',' ',' ','4',' ','5'},
				{' ','4',' ',' ','8',' ','7',' ',' '},
				{'2',' ',' ','1',' ','4',' ',' ',' '},
				{'1',' ',' ','7',' ','8',' ',' ','9'},
				{' ',' ',' ','3',' ','6',' ',' ','7'},
				{' ',' ','6',' ','3',' ',' ','9',' '},
				{'5',' ','4',' ',' ','7',' ',' ','1'},
				{' ','1',' ',' ','4',' ',' ','7',' '}
		};
		
	
		assertArrayEquals(result, quest[1]);
	}
	
	
	// Test case 3: test class "Hard_qustion":  test question3
	@Test
	public void testquestion3() 
	{
		hard_qustion question =new hard_qustion();	
		char[][][] quest = question.get_questn();
		char [][]result = new char[][] {
				{' ','3','6',' ','4',' ','1',' ',' '},
				{' ',' ',' ',' ',' ','2','3',' ','8'},
				{' ','8',' ','5',' ',' ',' ',' ','9'},
				{' ','5',' ',' ','3',' ','7',' ',' '},
				{'1',' ',' ','6',' ','5',' ',' ','2'},
				{' ',' ','7',' ','8',' ',' ','1',' '},
				{'8',' ',' ',' ',' ','6',' ','3',' '},
				{'3',' ','2','8',' ',' ',' ',' ',' '},
				{' ',' ','9',' ','2',' ','8','7',' '}
		};
		
	
		assertArrayEquals(result, quest[2]);
	}
	
	
	
	// Test case 4: test class "Hard_qustion":  test solution1
	@Test
	public void testsolution1() 
	{
		hard_qustion question =new hard_qustion();	
		char[][][] sol = question.get_sol();
		char [][]result = new char[][] {
				{'8','6','7','2','9','1','5','3','4'},
				{'4','1','9','5','8','3','2','6','7'},
				{'5','2','3','7','6','4','8','9','1'},
				{'7','3','4','6','2','5','1','8','9'},
				{'9','8','6','3','1','7','4','5','2'},
				{'2','5','1','8','4','9','6','7','3'},
				{'6','9','2','1','7','8','3','4','5'},
				{'3','4','8','9','5','2','7','1','6'},
				{'1','7','5','4','3','6','9','2','8'}
		};
		
	
		assertArrayEquals(result, sol[0]);
	}
	
	
	
	// Test case 5: test class "Hard_qustion":  test solution2
	@Test
	public void testsolution2() 
	{
		hard_qustion question =new hard_qustion();
		char[][][] sol = question.get_sol();
		char [][]result = new char[][] {
				{'6','5','2','4','7','3','9','1','8'},
				{'7','8','3','2','1','9','4','6','5'},
				{'9','4','1','6','8','5','7','3','2'},
				{'2','6','7','1','9','4','8','5','3'},
				{'1','3','5','7','2','8','6','4','9'},
				{'4','9','8','3','5','6','1','2','7'},
				{'8','7','6','5','3','1','2','9','4'},
				{'5','2','4','9','6','7','3','8','1'},
				{'3','1','9','8','4','2','5','7','6'}
		};
		
	
		assertArrayEquals(result, sol[1]);
	}
	
	
	
	// Test case 6: test class "Hard_qustion":  test solution3
	@Test
	public void testsolution3() 
	{
		hard_qustion question =new hard_qustion();
		char[][][] sol = question.get_sol();
		char [][]result = new char[][] {
				{'2','3','6','9','4','8','1','5','7'},
				{'4','9','5','7','1','2','3','6','8'},
				{'7','8','1','5','6','3','4','2','9'},
				{'9','5','8','2','3','1','7','4','6'},
				{'1','4','3','6','7','5','9','8','2'},
				{'6','2','7','4','8','9','5','1','3'},
				{'8','7','4','1','9','6','2','3','5'},
				{'3','1','2','8','5','7','6','9','4'},
				{'5','6','9','3','2','4','8','7','1'}
		};
		
	
		assertArrayEquals(result, sol[2]);
	}
	
	
}
